package com.dib.neo.bkfs.fs;

import java.io.IOException;
import java.io.OutputStream;

public class BKFSOutputStream extends OutputStream {

  private final  BKFile file;

  public BKFSOutputStream(BKFile file) {
    this.file = file;
  }

  @Override
  public void write(int b) throws IOException {
    file.write(b);
  }


  @Override
  public void write(byte[] b, int off, int len) throws IOException {
    super.write(b, off, len);
    this.flush();
  }

  @Override
  public void flush() throws IOException {
    file.flush();
  }

  @Override
  public void close() throws IOException {
    super.close();
    file.close();
  }



}
